﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mono.Cecil;
using Mono.Cecil.Binary;

namespace CILADA.Engine
{
    public class AssemblyUtils
    {
        public static bool IsDotNetAssembly(string assemblyPath)
        {
            // TODO: Review this method.
            try
            {
                AssemblyDefinition manifest = AssemblyFactory.GetAssemblyManifest(assemblyPath);
                return (null != manifest);
            }
            catch (ImageFormatException)
            {
                return false;
            }
            catch (BadImageFormatException)
            {
                return false;
            }
        }
    }
}
